The calculation of the inverse of a matrix is used in many physics and mathematical analyses. For example, inverse calculations are used in the analysis of physical structures and electrical networks. Linear equations occur frequently in all branches of science and engineering, and effective methods are needed for solving them. Furthermore, many science and engineering problems lead not to a single equation, but to a system of equations. The object of solving the system is to find values of all unknowns that simultaneously satisfy all equations in the system.
The inverse of a matrix is defined in this manner: If [A] and [B] are square matrices such that they satisfy [A][B]=[I], where [I] is the n×n identity matrix, then [B] is called the inverse of [A] and we write [B]−[A]−1 ([B] equals [A] inverse). If [A]−1 exists then A is said to be nonsingular. Otherwise, we say [A] is singular. An identity matrix is defined as a square matrix in which each and every element is zero with the exception of the main diagonal, which is invariantly composed of unit elements.
The problem of solving a linear system Ax=b is central to many scientific computations. A system of m linear equations with n unknowns x1, x2, . . . , xn may be represented as shown below:                                                         a              11                        ⁢                          x              1                                +                                    a              12                        ⁢                          x              2                                +          ⋯          +                                    a                              1                ⁢                n                                      ⁢                          x              n                                      =                  b          1                                                                            a              21                        ⁢                          x              1                                +                                    a              22                        ⁢                          x              2                                +          ⋯          +                                    a                              2                ⁢                n                                      ⁢                          x              n                                      =                  b          2                                ⋯                                                              a              m1                        ⁢                          x              1                                +                                    a              m2                        ⁢                          x              2                                +          ⋯          +                                    a              mn                        ⁢                          x              n                                      =                  b          m                    
The coefficients (a's) and the constant terms (b's) are real numbers. A real solution of the system is any set of real values of x1, x2, . . . , xn which simultaneously satisfy the m equations.
Two systems of linear equations with the same number of unknowns are called equivalent if every solution value of either system is also a solution value of the other. An equivalent system of equations may be obtained by applying one or more of the following transformations: (a) interchanging any two of the equations; (b) multiplying any equation by any non-zero real constant; and (c) adding to any equation a multiple of another equation. To perform calculations, especially when working with a large number of coefficients, computers are used to carry out the operations as rapidly as possible.
The current methods for solving systems of linear equations can be classified into two different classes: direct techniques and iterative techniques. Direct techniques are methods that provide the answer in a fixed number of steps, subject to round-off errors created by the precision limits of digital computers. Iterative techniques start with an initial approximation to the solution and generate a sequence of vectors that converge to the solution. Direct techniques use various operations on matrices, such as addition or multiplication by a scalar, vector or another matrix. These methods have varying degrees of complexity, and the simpler methods are often limited to special cases or well-conditioned matrices. The present invention is related to direct methods for solving linear systems of equations. The applicant has found the following patents related to methods of solving linear equations systems (the content of all patents cited herein being incorporated by reference).
U.S. Pat. No. 4,787,057 to Hammond is directed to a machine-implemented method and apparatus for analyzing physical systems by performing matrix operations to solve systems of linear equations. Hammond discloses a method for loading and storing a large, sparse matrix in a form that makes it more efficiently manipulated by a plurality of interconnected processors, each having its own storage and capable of operation in a highly parallel manner. Although Hammond suggests in general that the back-substitution technique is particularly efficient when solving a system of the type A X=Q, when A is in the triangular form, either upper or lower, he does not suggest or disclose any method for transforming matrix A into a triangular matrix. Rather, Hammond simply states that “techniques for transforming a linear system of the general form to a system of the triangular form are well known” and does not give any detail of how to perform such operations (much less how to do so in a shorter time as compared to standard methods). Thus, Hammond deals with a technique for mapping a large, sparse matrix into a multiprocessor computer architecture for efficient and rapid computations on such a matrix. Whereas, the present invention is based on a new method for effecting the triangularization of matrices in less time, thereby making equation solution more efficient in a monoprocessor or multiprocessor computer.
Other prior art references which generally relate to methods and apparatus for operations of matrices and vectors are: U.S. Pat. No. 4,914,615 to Karmarkar et al.; U.S. Pat. No. 5,267,185 to Akabane et al.; U.S. Pat. No. 5,301,342 to Scott; U.S. Pat. No. 5,319,586 to Gupta et al.; U.S. Pat. No. 5,392,429 to Agrawal et al.; U.S. Pat. No. 5,490, 278 to Mochizuki; U.S. Pat. No. 5,548,798 to King; U.S. Pat. No. 6,078,938 to Pan et al.; U.S. Pat. No. 6,085,213 to Oberman et al.; U.S. Pat. No. 6,223,198 to Oberman et al.; and U.S. Pat. No. 6,230,101 to Wallis. All of the above references refer to solving linear equations systems, but they deal with hardware configurations, methods of manipulating the digital representations of matrices in the memory of computers, or to particular applications where the solution of the equations is carried out by iterative or direct methods known in the art. None of the references teaches or suggests a method for shortening the computing time spent in the solution of simultaneous linear equations which is applicable to any type of computer.
Typically, linear equation systems have been solved by the general two-step method of: (1) triangularization of a matrix, i.e. transforming the elements of the matrix so that it becomes a triangular matrix, in other words, an upper or lower matrix, meaning that the elements of the matrix below or above the main diagonal are zeros, and (2) backwards substitution of the elements of the matrix in order to calculate the values of the unknowns of the equations or the inverse of the matrix. These prior art methods use standard techniques for the triangularization step; for example, the well-known Gaussian method.
In contrast, it has been found that the time required by a computer programmed to solve an equation system is shortened by utilizing the method of triangularization of the present invention.
The second step, i.e. backwards substitution of the elements of matrix [A], is known in the art and comprises the operations needed for sequentially calculating the values of the vector of unknowns [xi] by substituting the values of [xi] already known in each row of the triangular matrix in order to find the other values of the vector [x].
However, the methods of the present invention shorten the time needed for transforming a matrix into a triangular matrix. This may be attributed, without intending to link the merits of the invention to this explanation, to the fact that manipulations of the elements of the matrix are more efficiently carried out in a column by column basis of each row instead of manipulating all elements of the matrix for each element being transformed.
In performing the above basic steps for triangularization of a matrix, there are many vector dot product operations. Therefore, a more rapid method of carrying out these vector multiplications is very desirable. The present invention also comprises a new method for performing the dot product of two vectors in less time than the methods of the prior art.
The dot product of two vectors may be exemplified as follows: Assuming vector A equals (x1, x2, x3) and vector B equals (y1, y2, y3) then the dot product of A·B equals x1y1+x2y2+x3y3. When the above algorithm is expressed in a computer-readable code and executed in a computer, the multiplication and addition is executed n times (n being the number of elements of each vector) and the final value of the accumulated partial results is the dot product of the two vectors, which is a scalar number. This direct approach to the calculation of the dot product of two vectors requires considerably more time than if the calculation is performed according to the method of the present invention.
Similarly, the sum of products or quotients of multiple vector elements, constants or functions can be calculated using the aforementioned method, by substituting the multiply operation for the expression corresponding to the sum of products or quotients, i.e. a[i]*b[i]*c*f(i); wherein a and b are one dimensional vectors, c is a numeric constant and f(i) is the result of evaluating function f with the value of each element [i].
U.S. Pat. No. 4,884,232 to Schlunt describes a digital circuit designed to execute a parallel algorithm to compute the dot product of large dimensional vectors at very high speed. The invention of Schlunt is directed to the circuitry rather than a particular computer programming method for performance of such dot-product operations (especially one with improved time performance).
U.S. Pat. Nos. 6,085,213 and 6,223,198 also involve calculating the dot product of vectors, but these patents are directed to a method for operating a microprocessor and a microprocessor architecture and a digital circuit adapted to execute the known method in parallel instead of serially. However, they do not disclose decreasing the time involved in the calculation of the dot product of two vectors by programming a computer in a manner such that the total number of multiplication and addition operations are subdivided into a subroutine performing such operations in groups of certain size and then adding the partial results of the groups in order to obtain the final value of the dot product.
The method of the invention requires fewer calculations than the methods of the prior art, which is very useful in view of the widespread application of this operation. Therefore a need exists to decrease the time consumed by programmable computers in performing repetitive vector dot product operations. Since there are numerous computer applications where operations on vectors and matrices are essential, there is a need for efficient computer methods and systems to speed up calculations involving matrices.